/**
 * Demonstrates a range of Button options the framework offers out of the box
 */
Ext.define('cloud.view.app.AppFunction', {
    extend: 'Ext.Panel',
    xtype: 'appfunction',
    config: {
        title: '设置应用功能',
        layout:'card',
        items: [
            {
                xtype: 'toolbar',
                docked: 'bottom',
                layout: {
                    type: 'hbox',
                    pack: 'end'
                },
                items: [
                    {
                        id: 'function_add',
                        iconMask: true,
                        scope: this,
                        cls: 'x-button2',
                        text: '添加功能',
                        style: 'float:right'
                    }
                ]
            },

            {
                xtype: 'list',
                flex: 1,
                pressedCls: false,
                selectedCls: false,
                store: 'AppFunction',
                id:'functionList',
                cls: 'x-list2',
                emptyText: '还未添加应用功能',
                itemTpl: '<div class="listName" style="line-height: 50px;">{name}</div>' +
                    '<tpl if="ftype != 1"><input type="button" value="删除应用功能" name="delet_function" style="width: 100px; position: absolute; top: 20px; right: 60px;font-size: 12px;"  /></tpl>'
            },{
                xtype: 'hiddenfield',
                id: 'app_id'
            }

        ]
    }
});